<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;

class EmailTemplate extends Mailable
{
    use Queueable, SerializesModels;
    public $asks;
    public $id;
    public $email;
    public $before;
    public $after;
    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($datas)
    {
        //
        $this->id = $datas['id'];
        $this->email = $datas['email'];
        $this->before = $datas['before'];
        $this->after = $datas['after'];
        $this->asks = explode("\r\n",$datas['asks']);

    }
   

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->markdown('email')
                    ->subject('A survey from the Zhenben company');
    }
}
